<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <script type="text/javascript">
        var ctx = "${ctx}";
    </script>
    <%@ include file="/static/pages/common.jsp" %>
    <title>业务表配置</title>
</head>
<body>
<div id="zyxxContent">
    <div class="megbox">
        <form id="zyxxForm" name="zyxxForm" class="megbox_form">
            <dl class="megbox_dl">
                <dd>
                    <label>表名：</label>
                    <span class="megbox_span">
                        <input id="NAME" name="NAME" readonly="readonly" value="${genTable.name}"
                               class="megbox_input inp_readonly" type="text" style="border: none;">
                    </span>
                </dd>
                <dd>
                    <label>类名：</label>
                    <span class="megbox_span">
                        <input id="CLASS_NAME" name="CLASS_NAME" class="megbox_input inp_readonly" type="text">
                    </span>
                </dd>
                <dd>
                    <label>注释：</label>
                    <span class="megbox_span">
                        <input id="comments" name="comments" class="megbox_input inp_readonly" type="text">
                    </span>
                </dd>
                <dd>
                    <button type="button" class="_masterbtn" onclick="saveTable();">保存</button>
                </dd>
                <%--<dd>--%>
                <%--<button type="button" class="_masterbtn" onclick="saveZYXX();">下一步</button>--%>
                <%--</dd>--%>
            </dl>
            <table style="border: 1px solid #ff0000;width: 100%;text-align: center;" id="myTable">
                <tr>
                    <th>列名</th>
                    <th>说明</th>
                    <th>数据类型</th>
                    <th>是否为空</th>
                    <th>JAVA类型</th>
                    <th>JAVA字段名字</th>
                </tr>
                <c:forEach items="${genTable.columnList}" var="column">
                    <tr style="border: 1px solid #ff0000" class="myTr">
                        <td>${column.name}</td>
                        <td>${column.comments}</td>
                        <td>${column.jdbcType}</td>
                        <td>
                            <c:if test="${column.isNull == 0}">不为空</c:if>
                            <c:if test="${column.isNull == 1}">可以为空</c:if>
                        </td>
                        <td>
                            <select>
                                <c:forEach items="${javaTypeList}" var="javaType">
                                    <option value="${javaType.value}"
                                            title="${javaType.description}">${javaType.label}</option>
                                </c:forEach>
                            </select>
                        </td>
                        <td><input type="text"></td>
                    </tr>
                </c:forEach>
            </table>
            <%--<dl class="megbox_dl">
                <dd style="width:562px;"><p class="fl_r">
                    <button type="button" class="_masterbtn" onclick="saveZYXX();">保存</button>
                </p></dd>
            </dl>--%>
        </form>
    </div>
</div>
</body>
</html>